package com.kitty.game.party;

import com.kitty.game.party.model.Party;
import com.kitty.game.map.MapDataPool;
import com.kitty.game.utils.Const;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class PartyDataPool {
    /**帮派列表*/
    public static Map<Long, Party> partyMap = new ConcurrentHashMap<>();

    /**帮派名称对应id*/
    public static Map<String, Long> partyName2Id = new ConcurrentHashMap<>();

    public static Map<Long, Long> offlineRoleParty = new ConcurrentHashMap<>();

    /**帮派职业对应帮派权限*/
    public static Map<String, Byte> partyPermissions = new HashMap<>();

    /**帮派职业id对应名称*/
    public static Map<Short, String> jobId2Names = new HashMap<>();

    /**帮派等级升级需要建设度*/
    public static Map<Short, Integer> partyUpgrades = new HashMap<>();

    static {
        /**帮派地图，同一帮派id成员才能互相看到*/
        MapDataPool.MAP_KEY_GENERATERS.put(Const.PARTY_MAPID, (role -> role.getPartyId()));

        partyPermissions.put(Const.PARTY_JOB_BANG_ZHU, Const.PARTY_PERMISSION_BZ);
        partyPermissions.put(Const.PARTY_JOB_FU_BANG_ZHU, Const.PARTY_PERMISSION_FBZ);
        partyPermissions.put(Const.PARTY_JOB_XUAN_WU_ZL, Const.PARTY_PERMISSION_ZL);
        partyPermissions.put(Const.PARTY_JOB_ZHU_QUE_ZL, Const.PARTY_PERMISSION_ZL);
        partyPermissions.put(Const.PARTY_JOB_BAI_HU_ZL, Const.PARTY_PERMISSION_ZL);
        partyPermissions.put(Const.PARTY_JOB_QING_LONG_ZL, Const.PARTY_PERMISSION_ZL);
        partyPermissions.put(Const.PARTY_JOB_CANG_LAN_HF, Const.PARTY_PERMISSION_HF);
        partyPermissions.put(Const.PARTY_JOB_YUAN_LEI_HF, Const.PARTY_PERMISSION_HF);
        partyPermissions.put(Const.PARTY_JOB_JIAN_FENG_HF, Const.PARTY_PERMISSION_HF);
        partyPermissions.put(Const.PARTY_JOB_YE_FU_HF, Const.PARTY_PERMISSION_HF);
        partyPermissions.put(Const.PARTY_JOB_YUN_HAI_HF, Const.PARTY_PERMISSION_HF);
        partyPermissions.put(Const.PARTY_JOB_DE_XIN_TZ, Const.PARTY_PERMISSION_TZ);
        partyPermissions.put(Const.PARTY_JOB_SU_XIA_TZ, Const.PARTY_PERMISSION_TZ);
        partyPermissions.put(Const.PARTY_JOB_AN_LONG_TZ, Const.PARTY_PERMISSION_TZ);
        partyPermissions.put(Const.PARTY_JOB_WEI_WU_TZ, Const.PARTY_PERMISSION_TZ);
        partyPermissions.put(Const.PARTY_JOB_ZI_YUN_TZ, Const.PARTY_PERMISSION_TZ);
        partyPermissions.put(Const.PARTY_JOB_TING_XUE_TZ, Const.PARTY_PERMISSION_TZ);
        partyPermissions.put(Const.PARTY_JOB_MENG_XI_TZ, Const.PARTY_PERMISSION_TZ);
        partyPermissions.put(Const.PARTY_JOB_XUAN_FENG_TZ, Const.PARTY_PERMISSION_TZ);
        partyPermissions.put(Const.PARTY_JOB_BANG_PAI_JY, Const.PARTY_PERMISSION_JY);
        partyPermissions.put(Const.PARTY_JOB_BANG_ZHONG, Const.PARTY_PERMISSION_BZONG);

        jobId2Names.put(Const.PARTY_JOB_ID_BANG_ZHU, Const.PARTY_JOB_BANG_ZHU);
        jobId2Names.put(Const.PARTY_JOB_ID_FU_BANG_ZHU, Const.PARTY_JOB_FU_BANG_ZHU);
        jobId2Names.put(Const.PARTY_JOB_ID_XUAN_WU_ZL, Const.PARTY_JOB_XUAN_WU_ZL);
        jobId2Names.put(Const.PARTY_JOB_ID_ZHU_QUE_ZL, Const.PARTY_JOB_ZHU_QUE_ZL);
        jobId2Names.put(Const.PARTY_JOB_ID_BAI_HU_ZL, Const.PARTY_JOB_BAI_HU_ZL);
        jobId2Names.put(Const.PARTY_JOB_ID_QING_LONG_ZL, Const.PARTY_JOB_QING_LONG_ZL);
        jobId2Names.put(Const.PARTY_JOB_ID_CANG_LAN_HF, Const.PARTY_JOB_CANG_LAN_HF);
        jobId2Names.put(Const.PARTY_JOB_ID_YUAN_LEI_HF, Const.PARTY_JOB_YUAN_LEI_HF);
        jobId2Names.put(Const.PARTY_JOB_ID_JIAN_FENG_HF, Const.PARTY_JOB_JIAN_FENG_HF);
        jobId2Names.put(Const.PARTY_JOB_ID_YE_FU_HF, Const.PARTY_JOB_YE_FU_HF);
        jobId2Names.put(Const.PARTY_JOB_ID_YUN_HAI_H, Const.PARTY_JOB_YUN_HAI_HF);
        jobId2Names.put(Const.PARTY_JOB_ID_DE_XIN_TZ, Const.PARTY_JOB_DE_XIN_TZ);
        jobId2Names.put(Const.PARTY_JOB_ID_SU_XIA_TZ, Const.PARTY_JOB_SU_XIA_TZ);
        jobId2Names.put(Const.PARTY_JOB_ID_AN_LONG_TZ, Const.PARTY_JOB_AN_LONG_TZ);
        jobId2Names.put(Const.PARTY_JOB_ID_WEI_WU_TZ, Const.PARTY_JOB_WEI_WU_TZ);
        jobId2Names.put(Const.PARTY_JOB_ID_ZI_YUN_TZ, Const.PARTY_JOB_ZI_YUN_TZ);
        jobId2Names.put(Const.PARTY_JOB_ID_TING_XUE_TZ, Const.PARTY_JOB_TING_XUE_TZ);
        jobId2Names.put(Const.PARTY_JOB_ID_MENG_XI_TZ, Const.PARTY_JOB_MENG_XI_TZ);
        jobId2Names.put(Const.PARTY_JOB_ID_XUAN_FENG_TZ, Const.PARTY_JOB_XUAN_FENG_TZ);
        jobId2Names.put(Const.PARTY_JOB_ID_BANG_PAI_JY, Const.PARTY_JOB_BANG_PAI_JY);
        jobId2Names.put(Const.PARTY_JOB_ID_BANG_ZHONG, Const.PARTY_JOB_BANG_ZHONG);


        partyUpgrades.put((short) 2, 100000);
        partyUpgrades.put((short) 3, 500000);
        partyUpgrades.put((short) 4, 1000000);
    }
}
